<style>
    .tree-control .tree-view{
        min-width: 200px;
    }
    .assign-user{
        margin-left: 0;
    }
    .tree-control .tree-input{
        min-width: 200px;
    }

    .tree-control .tree-input {
      position: relative;
      /* min-width: 200px; */
      display: inline-block;
      text-align: left;
      padding-left: 12px;
      cursor: pointer;
      border: 1px solid #cfdadd;
      padding-top: 9px;
      font-size: 12px;
      min-height : 38px !important;
      border-radius: 0px;
      color: #58666e;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      -o-user-select: none;
      user-select: none;
      white-space:normal;
      background-color: #fff;
      /* background-image: linear-gradient(#fff, #f7f7f7); */
    }
    .rounded {
      border-radius: 5px;
    }


</style>
<div class="settings panel panel-default">
    <button id="settingBtn" class="btn btn-default no-shadow pos-abt" ng-click="click()" ui-toggle-class="active" target=".settings">
        <i class="fa fa-spin fa-gear"></i>
    </button>
    <div class="panel-heading">
        操作栏
    </div>
    <div class="panel-body">
        <!--自定义列表-->
        <div class="btn-group dropdown" style="width: 100%" dropdown ng-if="setting.isSelectCloumn">
            <button type="button" class="fa fa-filter btn btn-default" style="width: 100%" dropdown-toggle>
                表头隐藏/显示
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu" ng-click="setting.tableScope.stop($event)">
                <li ng-repeat="column in setting.tableScope.all">
                    <label class="dt-checkbox">
                        <input type="checkbox" ng-checked="column.checked"
                               ng-click="setting.tableScope.onCheck(column)">{{column.name}}
                    </label>
                </li>
            </ul>
        </div>
        <div class="" style="margin-top: 5px;margin-bottom: 5px"></div>

        <!--树形下拉框-->
        <div class="assign-user" ng-if="setting.treeSlt.show">
            <multi-select-tree data-input-model="setting.treeSlt.data"
                               multi-select="false"
                               data-crt-value="{{setting.treeSlt.name}}"
                               data-default-label="{{setting.treeSlt.label}}"
                               data-callback="setting.treeSlt.func(item)"
                               data-cancel-select="setting.treeSlt.cancelFunc(item)"
                               data-select-only-leafs="false">
            </multi-select-tree>
        </div>

        <!--下拉查询-->

        <div class="btn-group dropdown" style="padding-top: 10px;width: 100%;" dropdown ng-repeat="ele in setting.selectList">
            <button type="button" class="btn btn-default" style="width: 100%" dropdown-toggle>
                {{ele.crtName ? ele.crtName : ele.label}}
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu" role="menu">
                <li><a ng-click="ele.func()">{{ele.label}}</a></li>
                <li class="divider"></li>
                <li><a ng-repeat="item in ele.eleList" ng-click="ele.func(item)">{{item.name}}</a></li>
            </ul>
        </div>

        <!-- 加载多个ui-select框 -->
        <div>
            <m-ui-select prompt="{{ele.prompt}}"
                         itme-list="ele.items"
                         selected-item="ele.selectedItem"
                         select-item-fun="ele.func(item)"
                         ng-repeat="ele in setting.uiSltList">
            </m-ui-select>
        </div>
        <div class="form-group" style="padding-top: 10px; width: 220px;" ng-if="setting.dateRadios.show">
            <span ng-repeat="rad in setting.dateRadios.radios" ng-if="setting.dateRadios.show">
                <label class="'btn btn-xs btn-rounded" style="padding-right: 10px ; border: 1px solid #dee5e7;" ng-class="$ctrl.radioIem==rad.key ? 'btn-info' : 'btn-default'" ng-model="$ctrl.radioIem" btn-radio="rad.key" uncheckable ng-click="dateRadioClick(rad)">{{rad.value}}</label>
            </span>
        </div>

        <!--选择框-->
        <div class="form-group" style="padding-top: 10px; width: 220px;" ng-repeat="ele in setting.switchList">
            <label class='i-switch'>
                <input type='checkbox' name='switch' checked='ele.check ? false : true' ng-model='ele.check' ng-change='ele.checkFun(ele.check)'>
                <i></i>
            </label>
            <label class="col-sm-9" style="float: right">{{ele.label}}</label>
        </div>


        <!--搜索框-->
        <div class="form-group" style="padding-top: 10px; width: 220px;" ng-if="setting.search.show">
            <div class="input-group">
                <input type="text"
                       class="form-control input-sm bg-light no-border rounded padder"
                       placeholder="请输入查询内容..."
                       ng-model="setting.search.searchValue"
                       ng-blur="setting.search.blurFunc(setting.search.searchValue)">
                <span class="input-group-btn">
                    <button type="button" class="btn btn-sm bg-primary.lt rounded"
                            ng-click="setting.search.func(setting.search.searchValue)"
                            style="line-height: 18px;"><i class="fa fa-search"></i></button>
                </span>
            </div>
        </div>

        <div ng-if="setting.uiSltList.length > 0" style="margin-top: 5px;margin-bottom: 20px"></div>
        <!--按钮-->
        <div>
            <button type="button" style="margin-right: 5px;border-radius: 10px;" id="{{ele.btnId}}" ng-repeat="ele in setting.btnList track by $index"
                    class="btn btn-default" data-dismiss="modal"
                    ng-click="ele.func()">{{ele.label}}
            </button>
        </div>
    </div>
</div>